import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';

import User from './views/users';

import { ApolloProvider } from '@apollo/client';
import client from './client';

import 'antd/dist/antd.css';


function App () {

  return (
    <ApolloProvider client={client}>
      <BrowserRouter>
        <Route path="/" exact component={User} />
      </BrowserRouter>
    </ApolloProvider>
  )
}

function render () {
  ReactDOM.render(<App />, document.getElementById('app'));
}

render();

const m = module as any;

if (m.hot) {
  console.log(m);
  m.hot.accept(render);
}